package com.huawei;

import java.util.*;

public class HJ003 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        //前n行为输入的数
        int maxLine = scanner.nextInt();
        //记录输入的第几行，为了退出while循环
        int lineNum = 0;

        TreeSet<Integer> set = new TreeSet<>();
        while(scanner.hasNext()){
            int line = scanner.nextInt();
            ++lineNum;
            set.add(line);
            if(lineNum == maxLine){
                //退出循环
                break;
            }
        }
        for (Integer integer : set) {
            System.out.println(integer);
        }
    }
}
